﻿#region COPYRIGHT
//--------------------------------------------------------------------------------
// <copyright file="MouseEventArgs.cs" company="starLiGHT Entertainment Studios">
//    Copyright (c) 2011 
//       Roland Rosenkranz (Glatzemann@email.de)
// </copyright>
// <license>
//   This file is part of starLiGHT.GUI.
//
//   It is released under the Microsoft Public License (Ms-PL).
//
//   You should have received a copy of the Microsoft Public License
//   along with starLiGHT.GUI. If not, see http://sle.codeplex.com/license.
//    
//   ADDITIONAL (commercial) LICENSES for starLiGHT.GUI are available on request.
// </license>
// <version>
// **************[ starLiGHT.Engine SVN ]**********************
// * $Rev::                       $:  Revision of last commit *
// * $Author::                    $:  Author of last commit   *
// * $Date::                      $:  Date of last commit     *
// ************************************************************
// </version>
//--------------------------------------------------------------------------------
#endregion

namespace starLiGHT.GUI
{
#region Using Statements
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework;
#endregion

    public class MouseEventArgs : EventArgs
    {
        private bool leftButton;
        private bool rightButton;
        private bool widgetHit;
        private Vector2 position;

        public MouseEventArgs(bool leftButton, bool rightButton, Vector2 position)
            : this(leftButton, rightButton, position, true)
        {
        }

        public MouseEventArgs(bool leftButton, bool rightButton, Vector2 position, bool widgetHit)
        {
            this.leftButton = leftButton;
            this.rightButton = rightButton;
            this.position = position;
            this.widgetHit = widgetHit;
        }

        public bool LeftButton
        {
            get
            {
                return this.leftButton;
            }

            set
            {
                this.leftButton = value;
            }
        }

        public bool RightButton
        {
            get
            {
                return this.rightButton;
            }

            set
            {
                this.rightButton = value;
            }
        }

        public bool WidgetUnderMouse
        {
            get
            {
                return this.widgetHit;
            }

            set
            {
                this.widgetHit = value;
            }
        }

        public Vector2 Position
        {
            get
            {
                return this.position;
            }

            set
            {
                this.position = value;
            }
        }

        public override string ToString()
        {
            return string.Format("Left: {0} Right: {1} Position: {2}", this.leftButton, this.rightButton, this.position);
        }
    }
}
